package com.lyn.demo;

import com.feizhou.swagger.annotation.Api;
import com.feizhou.swagger.annotation.ApiOperation;
import com.feizhou.swagger.annotation.Param;
import com.feizhou.swagger.annotation.Params;
import com.jfinal.core.Controller;

@Api(tag = "api.v1.swagger", description = "测试swagger")
public class SwaggerDemoController extends Controller {

    @ApiOperation(url = "/testGetSimpleType", httpMethod = "get", description = "测试传入简单类型")
    @Params({
            @Param(name = "num", description = "数字", required = true, dataType = "Integer"),
            @Param(name = "str", description = "字符串", required = true, dataType = "string"),
            @Param(name = "date", description = "日期", required = true, dataType = "Date")
    })
    public void testGetSimpleType() {
        String num = getPara("num");
        String str = getPara("str");
        String date = getPara("date");
        System.out.println(num+", "+str+", "+date);
        renderJson();
    }


}
